/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 故我
 * Date: 2023-05-07
 * Time: 14:41
 */
abstract class Shape {
    public abstract void drow();
}

class Reator extends Shape {
    @Override
    public void drow() {
        System.out.println("方形！");
    }
}

class Cicle extends Shape {

    @Override
    public void drow() {
        System.out.println("⚪!");
    }
}

class Flower extends Shape {

    @Override
    public void drow() {
        System.out.println("❀!");
    }
}

public class Testdemo2 {
    public static void drowMap(Shape shape) {
        shape.drow();
    }

    public static void main(String[] args) {
        Reator reator = new Reator();
        Cicle cicle = new Cicle();

        Shape[] shapes = {reator, cicle, new Flower()};
        for (Shape shape : shapes) {
            drowMap(shape);
        }
    }
}


//public class Testdemo2 {
//    public int year;
//    public int month;
//    public int day;
//
//    public void setTestdemo2(int year, int month, int day) {
//        this.year = year;
//        this.month = month;
//        this.day = day;
//    }
//
//    public void printDate() {
//        System.out.println(year + "-" + month + "-" + day);
//    }
//
//    public static void main(String[] args) {
//        Testdemo2 test = new Testdemo2();
//        test.setTestdemo2(2023, 5, 7);
//        test.printDate();
//    }
//}
